﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Forms;

namespace WpfSample
{
    /// <summary>
    /// Interaction logic for FilterPropertyDialog.xaml
    /// </summary>
    public partial class FilterPropertyDialog : Window
    {
        public FilterPropertyDialog(string name, object property)
        {
            InitializeComponent();

            PropertyGrid propertyGrid = new PropertyGrid();
            propertyGrid.Dock = DockStyle.Fill;
            windowsFormsHost1.Child = propertyGrid;

            this.Title = name;
            propertyGrid.SelectedObject = property;
        }

        private void buttonOk_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }
    }
}
